package com.hnkywl.sts.entity.cggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.sys.Yg;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: ZHUCHG
 * Date: 13-4-15
 * Time: 下午4:43
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_FP")
@Where(clause = "deleted!='1'")
public class Fp extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqFp", allocationSize = 1, sequenceName = "SEQ_BIZ_FP")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqFp")
    private Long id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JSD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Jsd jsd;
    //    发票张数
    private int fpzs;

    // 开票起始开票日（日期）
    private String startDate;

    // 截止开票日（日期）
    private String endDate;

    // 作废标志：1—作废，0—正常；
    private String zfbz;

    // 清单标志：1—有清单；0—无清单；
    private  String ywqd;

    // 发票种类：1—普通发票，0—专用发票；
    private String fpzl;


    //    发票类型 ,1—普通发票，0—专用发票；
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SJZDZ_FPLX_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sjzdz fplx;

    //    发票号码
    private String fphm;

    // 开票日期
    private String kprq;

    // 税务月份
    private  Integer swyf;

    // 不含税金额
    private Double bhsje;

    // 税率
    private Double sl;

    // 税额
    private Double se;

    //开票人
    @ManyToOne
    @JoinColumn(name = "KPR_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Yg kpr;

    // 商品明细行数
    private Integer num;

    //    备注
    private String bz;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Sjzdz getFplx() {
        return fplx;
    }

    public void setFplx(Sjzdz fplx) {
        this.fplx = fplx;
    }

    public String getFphm() {
        return fphm;
    }

    public void setFphm(String fphm) {
        this.fphm = fphm;
    }

    public int getFpzs() {
        return fpzs;
    }

    public void setFpzs(int fpzs) {
        this.fpzs = fpzs;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getKprq() {
        return kprq;
    }

    public void setKprq(String kprq) {
        this.kprq = kprq;
    }

    public Integer getSwyf() {
        return swyf;
    }

    public void setSwyf(Integer swyf) {
        this.swyf = swyf;
    }

    public Double getBhsje() {
        return bhsje;
    }

    public void setBhsje(Double bhsje) {
        this.bhsje = bhsje;
    }

    public Double getSl() {
        return sl;
    }

    public void setSl(Double sl) {
        this.sl = sl;
    }

    public Double getSe() {
        return se;
    }

    public void setSe(Double se) {
        this.se = se;
    }

    public Yg getKpr() {
        return kpr;
    }

    public void setKpr(Yg kpr) {
        this.kpr = kpr;
    }

    public String getZfbz() {
        return zfbz;
    }

    public void setZfbz(String zfbz) {
        this.zfbz = zfbz;
    }

    public String getYwqd() {
        return ywqd;
    }

    public void setYwqd(String ywqd) {
        this.ywqd = ywqd;
    }

    public String getFpzl() {
        return fpzl;
    }

    public void setFpzl(String fpzl) {
        this.fpzl = fpzl;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
}
